package org.dcc.order;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.context.event.EventListener;

/**
 * Hello world!
 */
@SpringBootApplication
public class OrderStart {
    public static void main(String[] args) {
        SpringApplication.run(OrderStart.class, args);
    }

    @EventListener(WebServerInitializedEvent.class)
    public void onWebServerReady(WebServerInitializedEvent event){
        System.out.println("server " + event.getWebServer().getPort());
    }
}
